package com.lkd.job;

import com.lkd.service.UserService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class UserJob {

    @Autowired
    private UserService userService;

    @XxlJob("workCountInitJobHandler")
    public ReturnT<String> workCountInitJobHandler(String param){
        log.info("====任务回调了");
//        初始化员工工单列表
        userService.initUserTaskList();
        return ReturnT.SUCCESS;
    }
}
